package ModelLayer;


/**
 * Write a description of class SalesLine here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class SalesLine
{
    private int salesQuantity;
    private Product salesProduct;
    private double discount;
    public SalesLine(Product salesProduct, int salesQuantity)
    {
        this.salesQuantity = salesQuantity;
        this.salesProduct = salesProduct;
        this.discount = discount;
    }

    //SETTERS
    
    public void setSalesQuantity(int newQuantity)
    {
        salesQuantity = newQuantity;
    }
    
    public void setDiscount(int myDiscount)
    {
        discount = myDiscount;
    }
    
    //GETTERS
    
    public int getSalesQuantity()
    {
        return salesQuantity;
    }
    
    public Product getProduct()
    {
        return salesProduct;
    }
    
    public double getDiscount()
    {
        return discount;
    }
    
    
    public boolean increaseQuantity(int increment)
    {
        if(increment>0)
        {

            salesQuantity+=increment;
            return true;
        }
        else
        {
            return false;
        }
    }
}
